function Y = ComputeDotFunction( F, x )
N = size(F, 2);
if x <= F(1).x
    Y = F(1).y;
else
    if x >= F(N).x
        Y = F(N).y;
    else
        i = 1;
        j = N;
        while (i + 1 < j)
            p = i + idivide(int32(j - i), 2);
            if (x <= F(p).x)
                j = p;
            else
                i = p;
            end;
        end;
        Y = F(j).y;
    end;
end;
end

